package com.avic.rong.course.adapter;

import android.content.Context;
import android.support.v4.content.ContextCompat;

import com.avic.rong.R;
import com.avic.rong.course.bean.PeiXunSortBean;

import java.util.ArrayList;
import java.util.List;

import q.rorbin.verticaltablayout.adapter.TabAdapter;
import q.rorbin.verticaltablayout.widget.ITabView;

/**
 * Creater: Created by wangyz on 2019/8/23.
 * Email: 936804097@qq.com
 */
public class VedioTabAdapter implements TabAdapter {

    private List<PeiXunSortBean.ClassifyListBean> list = new ArrayList<>();
    private Context context;

    public VedioTabAdapter(Context context,List<PeiXunSortBean.ClassifyListBean> list) {
        this.context = context;
        this.list = list;
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public ITabView.TabBadge getBadge(int position) {
        return null;
    }

    @Override
    public ITabView.TabIcon getIcon(int position) {
        return null;
    }

    @Override
    public ITabView.TabTitle getTitle(int position) {
        ITabView.TabTitle.Builder tabTitleBuilder = new ITabView.TabTitle.Builder();
        tabTitleBuilder.setContent(list.get(position).getName()).setTextColor(ContextCompat.getColor(context, R.color.red_dot_color),ContextCompat.getColor(context,R.color.text_black_2));
        return tabTitleBuilder.build();
    }

    @Override
    public int getBackground(int position) {
        return 0;
    }



}
